home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000059_icon-group-sender _Mon Mar 3 12:56:34 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
8KB
Received: by cheltenham.cs.arizona.edu; Mon, 3 Mar 1997 13:02:08 MST
Message-Id: <199703031852.AA05027@optima.cs.arizona.edu>
X-Sender: lindsay@mail.rmc.ca
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Mon, 03 Mar 1997 12:56:34 -0500
To: jan@solstice.digicomp.com (Jan Galkowski), icon-group@cs.arizona.edu,
jtgalkowski@worldnet.att.net
From: "John H. Lindsay" <lindsay_j@rmc.ca>
Subject: Re: "Re: Icon and two-dimensional matching
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 7649
At 11:51 1997 02 28 -0500, you wrote:
>
>On Fri, 28 Feb 1997 09:45:54 -0500 John H. Lindsay"
><lindsay_j@rmc.ca> wrote
>>... big snip ...
>
>>You (and at least one other poster) rightly point out the nicities and
>>problems related to 2-dimensional extensions. In the same vein,
>>I'll drop back to 1-dimensional ideas.
>
>I hope you have posted this response out to comp.lang.icon. I didn't
>see it there. Actually, I didn't even see this other post that addressed
>2-dimensional extensions. Newsgroups are funny things. If you could,
>might you send me a copy of this other post? Thanks. Sounds
>interesting.
I've just about finished reorganizing my machine, partly due to
hardware problems, and partly due to a major reorganization of the
college's net access; I have e-mail back, but not a news reader just
yet. I received your message via e-mail since I'm on the Icon
mailing list. I've copied my original e-mail for you to the news
group, and added the news group address to this message. The
other message was the one by Mark Espie; let me know if you
didn't see it. I think posts to the news group are turned around
quite automatically to the mailing list, but appearance on the news
group may take quite a bit longer.
>>It has bothered me for a long time that the idea of _string_ has
>>only been applied to single characters in icon and many other
>>languages.
... snip ...
> Could you explain this part a little better? It seemed to run on.
There are only a couple of character string operators that are generally
implemented, concatenation and extraction of a copy of a substring.
SNOBOL4, and to a lesser extent, Icon, add pattern matching with
picking out values of simple or complex parts of the string as matched
by patterns. I find it a matter of assymetry that (1) many other languages
don't have strings of anything other than characters, (2) while Icon has
lists, they are different from strings (a list of characters is different from
a character string), lists have a different concatenation operator, but the
same element and substring selectors, and they don't have pattern
matching, and (3) where languages have ways of treating variables,
values and expressions, these are usually not propagated to strings
of any sort.
Of note is the ability of some languages to treat a portion of an agregate
or of an apparently indivisible thing like a file variable as if it were a
variable - a pseudovariable. In some cases this creates access to
otherwise inaccessible things, the status of a file, the ability to terminate
a task by setting the completion status of a task variable, or the current
dimensions of a conformant array parameter in ISO Extended Pascal.
In other cases, this both creates a problem in that there is more than
one way to address an area of storage (with problems for some (all?)
programmers ensuing), and also creates a necessary way to do some
necessary things like treat a diagonal or column of a vector of a matrix
as a vector in its own right. Slices or cross-sections of arrays in Algol
68 are a case in point; these may be written easily and assigned to IN SITU
as if they were variables so that the host array has its values changed.
Cross-sections may be passed to routines as arrays. There may be
some restrictions on what one can do with a pseudovarible - one might
resize an array, but would not attempt to resize a cross-section since
this would do violence to the host array, or be a meaningless operation.
Icon and SNOBOL emphasize handling values rather than references
although there are 'name' operators, and don't handle sub-arrays,
substrings or sublists as pseudovariables.
For my work, I'd really like to be able to define methods of handling
sub(structures | strings | arrays) as structures, strings, or arrays.
A few of these things are available in Icon, and the rest aren't. I need
to be able to do things like do pattern matching on the output of a
generator, where the generator might yield a stream of characters or a
stream of other sorts of things -- tokens. This means defining new
operators or extending the meaning of existing operators to new types
of data or to new semantic situations.
I'm interested in generalized macro processing, where the macro
processing becomes a method - a dynamic method - of program
language development, and that plays just as much a part in program
development as algorithm design, module design and data structure
design. One specifies the TRANSLATION of algorithms, data
specifications, ... into code. Previous passes over the text or previous
work in the same pass where rescanning is allowed, besides perhaps
transforming the text, may decorate it with tokens (roughtly, a structure
containing a source string and other information), or with trees or with
other structures and with other information. Then one has to recognize
patterns among the tag-along information and source text, and to
process it both by generating new information and transforming the
structures and data that exist.
> If I understand correctly, what you're going after is something like
>being able to bind arbitrary portions of what we call "strings" with
>procedural packages. I'm thinking of something like currying functions
>in the lambda calculus with pieces of "unevaluated" strings and being
>able to splice these critters in freely amongst the characters. Am I
>off?
Generally, I try to avoid deeper aspects of formal logic, so I'm guessing
here; you've got most of it, I think.
>>The worst part is that, currently, Icon lacks anything like SNOBOL4's
>>OPSYN that can be used to give unused unary prefix or binary infix
>>operators a meaning or a new meaning.
... snip ...
> I knew SNOBOL4 some time ago, but I forget what OPSYN does.
>In your post to the comp.lang.icon, could you describe these and other
>features of Icon? Not everyone who comes to and uses Icon came
>there from SNOBOL4.
OPSYN is a function that assigns an existing function name or operator
as the meaning of a name or operator. One can overload an operator by
saving the meaning of an operator, and then assigning the operator to a
routine containing a test of the data type of the arguments to determine
whether to apply the old operator meaning, or use the new meaning.
... snip ...
> Well, I suppose it depends upon what one means by functions. To
>me, an operator or functional is simply a curried version of a multiple
>parameter function, assuming functions have full rights as they should,
>and as they do in Icon, and Edison, for example.
Right. I don't know Edison; do you have a reference ?
>>For this type of end, I'd love to see the ability in Icon to create new
>>operators, and to extend and to redefine existing operators.
... snip ...
> Hmmm. Why couldn't one define a series of unbounded-number-of-
>arguments procedures which picked up their "actual" parameters by
>pattern matching in the immediate context of their being called? That is,
>why wouldn't the same be achieved by building pattern matching into
>the parameter passing mechanism, something which could be
>implemented on a procedure by procedure case? One wouldn't
>want the overhead of pattern matching in each and every instance,
>true?
????? I'll think about this one.
>
>Have a great weekend,
>
> Jan Galkowski.
Thanks, it was; I hope yours was great as well.
All the best !
John H. Lindsay, Assistant Professor,
DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE
ROYAL MILITARY COLLEGE OF CANADA
PO BOX 17000 STN FORCES
KINGSTON ON K7K7B4